package greendbgui

class ElectoralRollEntry 
{
	static mapping = 
	{
  		table 'electoral_roll_entry'
  		columns 
		{
			electoralRoll column:'electoral_roll'
			person column:'person'
			address column:'address'
    		refPrefix column:'ref_prefix'
    		refSuffix column:'ref_suffix'
			voteType column: 'vote_type'
  		}
		version false
	}

    static constraints = 
	{
		refPrefix()
		refSuffix()
		person()
		address()
		voteType()
    }

    ElectoralRoll electoralRoll
    Person person
    Address address
    String refPrefix
    String refSuffix
    String voteType
    
    String getRef()
	{
	    return refPrefix + " " + refSuffix;
	}
}
